<template>
  <div class="app-container">
    <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="学号" prop="studentId">
        <el-input
          v-model="queryParams.studentId"
          placeholder="请输入学号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学生姓名" prop="studentName">
        <el-input
          v-model="queryParams.studentName"
          placeholder="请输入学生姓名"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="考试状态" prop="safetyExaminationStudentType">
        <el-input
          v-model="queryParams.safetyExaminationStudentType"
          placeholder="请输入考试状态"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
      </el-form-item>
    </el-form> -->
    <el-table v-loading="loading" :data="examinationstudentrecordList">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="学号" align="center" prop="studentId" />
      <el-table-column label="学生姓名" align="center" prop="studentName" />
      <el-table-column label="学生班级" align="center" prop="studentClass" />
      <el-table-column label="已完成题数" align="center" prop="questionAlready" />
      <el-table-column label="正确数" align="center" prop="trueAmount" />
      <el-table-column label="考试状态" align="center" prop="safetyExaminationStudentType" />
      <el-table-column label="合格状态" align="center" prop="qualifiedType" />
    </el-table>
    
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
import { listbranchdetail } from "@/api/system/branchanswer.js";

export default {
  name: "Examinationstudentrecord",
  components: {
  },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 学生记录表格数据
      examinationstudentrecordList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        studentId: null,
        studentName: null,
        safetyExaminationStudentType: null,
        questionAlready: null,
        trueAmount: null,
        prizeType: null,
        startDate: null,
        finalDate: null,
		examinationId: null
      },
      // 表单参数
      form: {}
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询学生记录列表 */
    getList() {
      this.loading = true;
	  this.queryParams.examinationId=this.$route.query.examinationId;
	  this.queryParams.collegeValue = this.$route.query.collegeValue;
      listbranchdetail(this.queryParams).then(response => {
        this.examinationstudentrecordList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        studentId: null,
        studentName: null,
        safetyExaminationStudentType: null,
        questionAlready: null,
        trueAmount: null,
        safetyExaminationStudentType: null,
        prizeType: null,
        startDate: null,
        finalDate: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    }
  }
};
</script>
